<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:c="http://java.sun.com/jsf/core">
<head>
    <meta charset="UTF-8">
    <title>admin</title>
    <style>
        html {
            background: url(https://i02piccdn.sogoucdn.com/122644300e8e567f) no-repeat center center fixed;
            -webkit-background-size: cover;
            -moz-background-size: cover;
            -o-background-size: cover;
            background-size: cover;
        }
    </style>
</head>
<body>
<div>

        <div th:object="${session.admin}">
            <span th:text="*{permission}"></span>:
            <span th:text="*{uname}"></span><br>
            账户:<span th:text="*{account}"></span>
            <a th:href="@{/page/login}">退出</a>
            <a th:href="@{/user/Login/(uname=${session.admin.getUname()},pwd=${session.admin.getPwd()})}">刷新</a>

        </div>
    </div>


    <div >
<!--        搜索框-->
        <form action="/admin/search">
            <input name="uname" id="uname" value="" placeholder="使用用户名搜索">
            <input name="phonenumber" id="phonenumber" value="" placeholder="使用手机号搜索">
            <select name="Permission" id="Permission" >
                <option>用户</option>
                <option>商家</option>
                <option>管理员</option>
            </select>
            <button type="submit">搜素</button>
            <button type="reset">清除</button>
        </form>
    </div>
<div>
    <table border="1" >
        <thead>
        <tr>
            <th>用户名</th>
            <th>密码</th>
            <th>手机号</th>
            <th>账户</th>
            <th>用户类型</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="User:${User}">
            <td th:text="${User.getUname()}"></td>
            <td th:text="${User.getPwd()}"></td>
            <td th:text="${User.getPhonenumber()}"></td>
            <td th:text="${User.getAccount()}"></td>
            <td th:text="${User.getPermission()}"></td>

        </tr>
        </tbody>
    </table>
</div>

<div>
    <h3>待处理商家</h3>
    <table border="1">
        <thead>
        <tr>
            <th>商店名</th>
            <th>用户名</th>
            <th>密码</th>
            <th>法人</th>
            <th>手机号</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="Shop:${Shop}">
            <td th:text="${Shop.getShop_name()}"></td>
            <td th:text="${Shop.getUser_name()}"></td>
            <td th:text="${Shop.getPwd()}"></td>
            <td th:text="${Shop.getLegal_p()}"></td>
            <td th:text="${Shop.getTel()}">
                <c:forEach var="list" items="${requestScope.list}">
            <td><a  th:href="@{/shop/reBack/(shopName=${Shop.getShop_name()})}">驳回</a></td>
            <td><a th:href="@{/shop/insertmerchant/(shopName=${Shop.getShop_name()})}">同意</a></td>
            </c:forEach>
        </tr>

        </tbody>
    </table>
</div>
</body>
</html>